Skip to content

feat(ui): unify activity feed alerts with notifications API (#25827) #27032

Closed
SaaiAravindhRaja wants to merge 3 commits intoopen-metadata:mainfrom
SaaiAravindhRaja:feat/issue-25827-unify-activity-feed-alerts
Closed

feat(ui): unify activity feed alerts with notifications API (#25827) #27032
SaaiAravindhRaja wants to merge 3 commits intoopen-metadata:mainfrom
SaaiAravindhRaja:feat/issue-25827-unify-activity-feed-alerts

Conversation

@SaaiAravindhRaja
Copy link
Copy Markdown
Contributor

Fixes #25827

Unifies the Activity Feed Alerts fetch path with the paginated Notifications API, fixing the off-by-one bug where page 1 shows 16 items (15 notifications + 1 alert fetched separately).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@SaaiAravindhRaja SaaiAravindhRaja changed the title feat(ui): unify activity feed alerts with notifications API (#25827) feat(ui): unify activity feed alerts with notifications API (#25827) [WIP] Apr 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@SaaiAravindhRaja SaaiAravindhRaja marked this pull request as ready for review April 4, 2026 11:16
@SaaiAravindhRaja SaaiAravindhRaja requested a review from a team as a code owner April 4, 2026 11:16
Copilot AI review requested due to automatic review settings April 4, 2026 11:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts Notification Alerts pagination so page 1 no longer renders an extra (16th) row by accounting for the separately-fetched ActivityFeedAlert system alert.

Changes:

  • Detects the “first page” fetch and reduces the API limit by 1, then prepends ActivityFeedAlert so the UI still shows pageSize total rows.
  • Updates Playwright pagination test to re-enable standard row-count validation for Notification Alerts.
  • Minor formatting change in NotificationBox interface file.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
openmetadata-ui/src/main/resources/ui/src/pages/NotificationListPage/NotificationListPage.tsx Changes first-page fetch behavior to avoid 16 rows by fetching pageSize - 1 and prepending ActivityFeedAlert.
openmetadata-ui/src/main/resources/ui/src/components/NotificationBox/NotificationBox.interface.ts Adds a trailing newline (formatting only).
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Pagination.spec.ts Removes special-casing so Notification Alerts pagination test validates row count again.
Comments suppressed due to low confidence (1)

openmetadata-ui/src/main/resources/ui/src/pages/NotificationListPage/NotificationListPage.tsx:169

  • The isFirstPage check (after and before both undefined) will be false when the user navigates back to page 1 via the "Previous" button, because that request uses a before cursor. In that case page 1 will be rendered without the ActivityFeedAlert row and will fetch pageSize items (not pageSize - 1), making the first page content inconsistent depending on how it was reached.

Consider keying this logic off the page number (e.g., currentPage === 1 / the currentPage coming from the paging handler), and when navigating to page 1 clear the cursor params and fetch without cursor so the ActivityFeedAlert is always included on page 1.

        const isFirstPage =
          isUndefined(params?.after) && isUndefined(params?.before);
        const { data, paging } = await getAllAlerts({
          after: params?.after,
          before: params?.before,
          limit: isFirstPage ? pageSize - 1 : pageSize,
          alertType: AlertType.Notification,
        });

        if (isFirstPage) {
          // Fetch and show the system created activity feed alert on page 1
          const activityFeedAlert = await getAlertsFromName(
            'ActivityFeedAlert'
          );
          setAlerts([activityFeedAlert, ...data]);
        } else {
          setAlerts(data);

@SaaiAravindhRaja SaaiAravindhRaja changed the title feat(ui): unify activity feed alerts with notifications API (#25827) [WIP] feat(ui): unify activity feed alerts with notifications API (#25827) Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 17, 2026

Code Review ✅ Approved

Unifies activity feed alerts with the notifications API to standardize cross-platform delivery. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@PubChimps
Copy link
Copy Markdown
Contributor

This issue has been closed, thank you for your submission!

@PubChimps PubChimps closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify Activity Feed Alerts with Notifications API & Enable Multi-Type Filtering

3 participants